The online racing simulator
Searching in All forums
(374 results)
Tim NL
S2 licensed
Quote from loconstant :Hi Tim,

Ok I tried unsucessfully. This is done with the method onResult (and point system)

do you see somethin completly wrong in my piece of code?

DEFAULT:
BREAK;
ENDSWITCH
SetCurrentPlayerVar( "ps_points_total",ToNum(GetCurrentPlayerVar( "ps_points_total" ))+ GetCurrentPlayerVar( "ps_race_points" ) );
setUserStoredValue( "ps_points_total", GetCurrentPlayerVar( "ps_points_total" ) );

#Loco
DelayedCommand( 15, test1 );

EndEvent

Sub test1()
privMsg( "Test" );
EndSub


Thanks,
Frederic

Hi,

you can try this to show "Test" after a delay of 15 sec.

openGlobalButton ("test",0,0,3,3,3,[COLOR=red]15[/COLOR],0," ",test);

Sub test()
privMsg( "Test" );
EndSub

Tim NL
S2 licensed
Quote from loconstant :Thanks.
So if i understand the delay only work when using a Sub method, right?

Loco

Yep, thats right. The DelayCommand wait x seconds and goes to a sub.
Tim NL
S2 licensed
Quote from loconstant :Hello,

I tried simple commande like:


Event OnResult( $flagConfirm )
DelayedCommand( 15, privMsg( "Test" ) );
EndEvent

But the result is not as expected. I have the display as soon I cross the line.
How does this command should work?

Thanks in advance

Hi,
You can use the DelayedCommand to call a sub after a delay


Event OnResult( $flagConfirm )
DelayedCommand( [COLOR=red]15[/COLOR], test );
EndEvent

Sub test()
privMsg( "Test" );
EndSub

Or use a priv or a global button to cal a sub after a delay


openGlobalButton ("test1",40,0,28,4,4,[COLOR=red]15[/COLOR],16,"(%cpt%)",test);

Sub test()
privMsg( "Test" );
EndSub

Tim NL
S2 licensed
Quote from lysergic :Hi all again...

I have lot of questions for U all from lot of time ago; now it's time to ask help (it isn't the first time..)
  • I setup autorestart and rotate track system
$VoteLifeSec = 30;
$AutoRestartRaceSec = 60;
$EnableRotation = true;
$RotateTracks = "SO4,AS1R,FE1,BL1";
$RotateEveryNbRaces = 6;
$RotateCars = "LX4";

but after few seconds of race start, the server restart the race again!
  • I really do not understand how to insert .dbs or .elp values into a mysql db, or read them in a php page, also if I have a linux, apache2, php5 hosting server I cannot find any help on how to read and show them
  • I use the racepoint system but I can't set it how I need.
    This is my league points system, any help?
    place 1 points 50
    2 40
    3 32
    4 26
    5 22
    6 20
    7 18
    8 16
    9 14
    10 12
    11 10
    12 8
    13 6
    14 4
    15 2
I know I'm boring, but I spent so much time trying to fix these settings that now I'm really demoralized

Hi,
For the first 2 questions i dont have a anser but for the last you can try try this "new" point system. ( i had not the time to test it but i think its working)

It shows the first 24 players and the first 15 who finish get the points what you ask for. number 16 to 24 get 0 points. number 25 to the last get also 0 points but do not show up on the list.
Tim NL
S2 licensed
Quote from Bass-Driver :hi
i have add these command like this:
CASE "!wr":
privMsg( "^7 World Record on this track/car");
cmdLfs( "/w wr");
BREAK;
CASE "!pb":
privMsg( "^7 Your Personal Best on this track/car");
cmdLfs( "/w pb");
BREAK;


when someone does !wr it shows only:
privMsg( "^7 World Record on this track/car"); for him/her
and i see the world record
this is the same with !pb

Hi,

/w pb and /w wr works only if you in a car , but when you use this with lapper it dont work ( see post above ).

Maybe you can use cmdLfs( " /ws trackname car pb username "); and cmdLfs( " /ws trackname car wr ");

If you have always one car you can use for example

cmdLfs( " /ws " . GetLapperVar( "ShortTrackName" ) . " fox pb " . GetCurrentPlayerVar("Username"));

If you have more then one car on your server you have to this for all cars on your server.

( i did not test it , maybe this weekend )
Tim NL
S2 licensed
Hi,
I have updated all the [NLR]NL Racing server's to Z21. All 6
Last edited by Tim NL, .
Tim NL
S2 licensed
Quote from loconstant :Hello Tim,

I exchanged the SQLLite and Mono .dll and i still have the same issue.
Should I delete the storedvalue.dbs?

Thanks

Hi,
You can try it with a clean install of lapper , in a new folder.(With a new storedvalue.dbs)

I tested your lpr file with a clean install. Only put your username in admin.txt and superuser.txt and change the admin pwd in default_1.ini

I have maked a new lpr file with the default file from 5.846.
Tim NL
S2 licensed
Quote from loconstant :So I have no chance.
When I want to use !rank I have this



Lapper Instance 127.0.0.1/30003 abort!

Column does not exist.
Mono.Data.SqliteClient
at Mono.Data.SqliteClient.SqliteDataReader.GetOrdinal (System.String name) [0x00000]
at LFSDbs.storedDbs.GetTable (System.String key, Int32 from, System.String relativeToUserName, Int32 nbRead, System.String Filter, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.TopStoredUser (Int32 UCID, System.String title, System.String key, System.String pusername, System.String pnickname, System.String pcmd, Boolean flagNear, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.execCmd (GLScript.unionVal val, System.Collections.ArrayList args, LFSLapper.infoPlayer currInfoPlayer) [0x00000]
at LFSLapper.LFSClient.myFunctions (GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.GLApp.parseBackcall (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.Parseur.getval (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.executeParsedFunction BC) [0x00000]
at GLScript.GLApp.retrieveEvalVar (System.String funcName, GLScript.TokenParse tkparse, GLScript.TokenBuffer currTokenBuffer, GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, Boolean breakFunc, System.Char& breakCar) [0x00000]
Int32 GetOrdinal(System.String)
Closing Instance...


Any idea?

[edit]
When the db is empty I do not have the error as soon there is one entry, it dumps.

there is the extrac of one line:
1,ps_points_total,driver1,^4PLFS^7-^1driver1,PLFS-driver1,1,

[edit 2]
It comes from call to nextuser and topuser function, getting the value works.

Hi Loco,

I tested you lpr file but its works ok here.
Tim NL
S2 licensed
Quote : Originally Posted by jasonmatthews
Has anyone been able to get LFS working in Dual monitor setup with NVidia card in Windows 7 or Vista?

As far as I know, these OS's do not support span mode at all. After some research, I read somewhere that the only way to achieve this is if the game itself provides the multi monitor setup.

I would love to be able to use dual monitor, especially with this new patch, but cannot for the life of me get LFS to register the extra resolution settings of the 2nd monitor, unless I am missing something?

Hi,
I use Vista and can run LFS on two monitors when i use UltraMon. (only in windowed mode , not full screen ).
Tim NL
S2 licensed
Hi,
If you want to use the track/car rotator.You can change the !top so you see always the current car in the !top list but you still get the -.- when the current car not equals the $DefaultTopCar. ( see post of Yisc[NL] above)


CASE "!top":
IF( $argv == "" )
THEN
top( getLapperVar( "CurrRotateCar" ));
ELSE
top( $argv );
ENDIF
BREAK;

Tim NL
S2 licensed
Quote from Takumi_lfs :Another fix for this is limiting your FPS to 100 or less. It seems to happen on my pc because lfs runs on 300-500 fps here.

I played with all of the graphic options and screen resolution, no succes at all.

Yes , i have the same.
Limiting to 100FPS and no problem, when i set no limit ( 150-260 fps) it goes wrong with rolling in Shift-U mode.
Tim NL
S2 licensed
Quote from Bass-Driver :oh i screwed something up
could u change it pls??

I have not test it but something like this.
Tim NL
S2 licensed
Quote from Bass-Driver :i have a lil problem with my "driftbox"
when someone do !drfon it turns driftbox on for himself
but if someone else go drift with driftbox off ,then it turns the driftbox automaticly on

###################################
#Event triggered when lapper start#
###################################
GlobalVar $driftbox;
$driftbox = "no";

i think this is the problem
i need to change "GlobalVar"in something else
in version 5.617 was this PlayerVar but this doesnt work in 5.845

Hi,
GlobalVar $driftbox; $driftbox = "no"; This is a globar var ( will counts for everybody)

For playervars use this

SetCurrentPlayerVar( "driftbox","no" );
and
GetCurrentPlayerVar( "driftbox" );
Tim NL
S2 licensed
Quote from Krayy :As your actual user name or as your nickname that you set in the options screen?

Its my username "tim nl"
Tim NL
S2 licensed
Quote from Krayy :I'm pretty sure that LFS will not let you register a username with a space in it.

Hi,

I have "tim nl" with a space.
Tim NL
S2 licensed
Quote from tikshow :until they can't make a rule system about crossing the line penalty it is useless, and some people will use it to cut that corner, the idea is great, but it has some problems right now

You can make this in Lapper. Try it on [NLR]NL Racing FOX (for now it only works with fox@as2).
Tim NL
S2 licensed
Quote from demogun :Thx for the reply.

i uploaded our LFSlapper.lpr here:
http://napviragpizzeria.hu/catalog/download/LFSLapper.lpr

maybe it helps...

Hi,
Your drift part had some faults.
Its fixed and tested in a "new" LFSLapper.lpr
Tim NL
S2 licensed
Hi,

Post your LFSLapper.lpr so we look at it.
I have 5.841RC still on my server , so i can test your LFSLapper.lpr.

Dont forget to remove your passwords and PubStatIdk
Tim NL
S2 licensed
Quote from Fire_optikz001 :ye but how do i store the values :S

Hi,
You can use this to write and read to the StoredValue database.

(example)
SetUserStoredValue( "LPass" , $LPass); #write to StoredValue database
getUserStoredValue( "LPass," ); #read from StoredValue database

Works the same in the point system.

[COLOR=blue] # read from database and store in playerVar[/COLOR]
[COLOR=orange]Line 59[/COLOR] SetCurrentPlayerVar( "ps_points_total",getUserStoredValue( "ps_points_total" ) );
[COLOR=blue] # write the value from playervar into the database[/COLOR]
[COLOR=orange]Line 162[/COLOR] setUserStoredValue( "ps_points_total", GetCurrentPlayerVar( "ps_points_total" ) );

Tim NL
S2 licensed
Quote from Krayy :Good point re the delayedcommand...maybe if you create a countdown button with 3 secs on it, but make it clear with no text, then it will act as a close/open timer

Thx, its works .


openPrivButton( "txt",0,0,1,1,1,10,0," ",start_race ); [COLOR=blue]# 10sec timer[/COLOR]

Sub start_race( $KeyFlags,$id )
cmdLFS( "/restart" );
EndSub

Tim NL
S2 licensed
Quote from lysergic :
Syntax error in cfg file line GlobalVar Char GlobalVar on file : "LFSLapper.lpr" at line #1839

Line 1839:
GlobalVar $point_L;
I paste Your code at bottom of LFSLapper.lpr in default dir

Hi,
Try this LFSLapper.lpr, its just a default file ( ver 5.845) with the point system allready in it.
Last edited by Tim NL, .
Tim NL
S2 licensed
Quote from Fire_optikz001 :can u help me

9/17/2009 9:12:17 PM -> Unexpected end function in event :MA_KB1 on file : "LFSLapper.SC" at line #1112

Sub MA_KB1()
openPrivButton( "2man212",52,130,5,25,1,12,32,"12");
openPrivButton( "2man212a",32,130,20,10,1,12,32,"12A");
DelayedCommand( 3, MA_KB2 );
EndSub

Sub MA_KB2()
openPrivButton( "2man212a",52,130,20,10,1,9,32,"12A");
DelayedCommand( 3, MA_KB3 );
EndSub

Sub MA_KB3 ( )
openPrivButton( "2man212a",52,130,20,10,1,14,32,"12A");
EndSub

Hi,
You can't use openprivbutton in this context, After a DelayedCommand is it not a player event anymore.
I had the same problem with the restart timer after the race.


9/18/2009 12:44:43 PM -> Syntax error in cfg file "server 6 5_844.lpr" at line #1634
You can't use openprivbutton in this context, not a player event
Function 'ma_kb2' script aborted

Tim NL
S2 licensed
Quote from erfrag :I'm getting this error in the LFSLapper logs: 9/17/2009 2:27:49 PM -> Syntax error in cfg file Need a item identification on file : "LFSLapper.lpr" at line #1973

LFSLapper.lpr line #1973

GlobalVar $point_L ;

Looks like you didn't copied the var's in your script or they are on the wrong place in the script.

###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()

GlobalVar $point_L ;
GlobalVar $point_T ;
GlobalVar $ps_max_points;
$point_L = 75 ;
$point_T = 5 ;
$ps_max_points=10;

Or post your LFSLapper.lpr so we can look at it.
Tim NL
S2 licensed
Hi,
All points are stored in the SQL database . ( storedvalue.dbs Tabel fi_user_value )
With some small changes you can also use this to setup events.
If you use for every race a different racenumber in a var ( exaple $racenumber ) ,you can show points results per race and show the total results points.


setUserStoredValue( "S2009_" . $racenumber, GetCurrentPlayerVar( "S2009_" . $racenumber" ) ); #Store data in database

topUser( "Season 2009 Race:" . $racenumber,"S2009_" . $racenumber,"DESC",argv ); # Shows the results for race x ( $racenumber )
topUser( "Season 2009 Total points","S2009_","DESC",argv ); # Shows the total results for S2009_
Last edited by Tim NL, .
Tim NL
S2 licensed
Quote from lysergic :Everybody wants a racepoint system.

@any programmer: How much money do You want?

Hi,

I dont want money , but here is a point system for 12 players if you want more its not so hard to expand.

With !rank and !point you can see your points.

Copy the folling parts into your lfslapper.lpr and have have a point system in lapper ( works not in ver 5.716 only in 5.841 or higher)

Its the same as on [NLR]NL Racing Copper (Demo FBM BL1) only have i there added a Licence system to.
On [NLR]NL Racing Test i have a bit diffent layout ( smaller letter ).

Have fun with....
FGED GREDG RDFGDR GSFDG